<!-- Title Variables -->
<% phc_title "PHCMembers - Member Address Manager" %>
<% phc_title_tagline "Address Index for " + @members_profile_info.mfirstname + " " + @members_profile_info.mlastname %>

<!-- Page Header -->
<div class="row">
	<div class="col-lg-12">

		<!-- Bread Crumbs -->
		<ol class="breadcrumb">
			<li><%= link_to "Dashboard", member_root_path %></li>
			<li><%= link_to "Member Profile List", member_profiles_path %></li>
			<li class="active"><%= yield(:phc_title_tagline) %></li>
		</ol>

		<!-- Page Title -->
		<h3 class="page-title">
			<%= yield(:phc_title) %> </br>
			<small><%= yield(:phc_title_tagline) %></small>
		</h3>

	</div>
</div>

<!-- Main Content -->
<div class="row">
	<div class="col-lg-12">

		<div class="panel panel-default">
			<div class="panel-heading">

				<div class="caption">
					<span class="caption-subject bold uppercase"><%= yield(:phc_title_tagline) %></span>
				</div>

			</div>
			<div class="panel-body">

				<div class="table-scrollable">
					<table class="table table-striped table-bordered table-advance table-hover">
						<thead>
							<tr>
								<th>Address Line 1</th>
								<th>Address Line 2</th>
								<th>City</th>
								<th>Province</th>
								<th>Country</th>
								<th>PostalCode</th>
								<th>Type</th>
							</tr>
						</thead>

						<tbody>
							<% @member_addresses.each do |member_address| %>
								<tr>
									<td class="highlight"><%= link_to member_address.mcaddressl1, member_profile_address_path(member_address.profile, member_address) %></td>
									<td class="highlight"><%= link_to member_address.mcaddressl2, member_profile_address_path(member_address.profile, member_address) %></td>
									<td class="highlight"><%= link_to member_address.mccity, member_profile_address_path(member_address.profile, member_address) %></td>
									<td class="highlight"><%= link_to member_address.mcprovince, member_profile_address_path(member_address.profile, member_address) %></td>
									<td class="highlight"><%= link_to member_address.mccountry, member_profile_address_path(member_address.profile, member_address) %></td>
									<td class="highlight"><%= link_to member_address.mcpostalcode, member_profile_address_path(member_address.profile, member_address) %></td>
									<td class="highlight"><%= link_to member_address.mctype, member_profile_address_path(member_address.profile, member_address) %></td>
								</tr>
							<% end %>
						</tbody>
					</table>
				</div>

			</div>
		</div>

		<%= link_to new_member_profile_address_path, class: "btn btn-primary" do %>
			<i class="fa fa-plus"></i> <%= "Add a New Address for " + @members_profile_info.mfirstname + " " + @members_profile_info.mlastname %>
		<% end %>

	</div>
</div>

